import { Building } from "./Building";
import { Road } from "./transportation";
import { PowerLine, PowerPlant } from "./power";
import { CommercialZone, ResidentialZone, IndustrialZone } from "./zones";


export function createBuilding(type: string) {

    switch (type) {
        case Building.type.commercial:
            return new CommercialZone();
        case Building.type.residential:
            return new ResidentialZone();
        case Building.type.industrial:
            return new IndustrialZone();
        case Building.type.road:
            return new Road();
        case Building.type.powerLine:
            return new PowerLine();
        case Building.type.powerPlant:
            return new PowerPlant();
        default:
            break;
    }

}